import Vue from 'vue'
import moment from 'moment'

Vue.filter('dateFormat', str => {
  let time = moment(str).format('YYYY-MM-DD HH:mm:ss')
  if(time === 'Invalid date') {
    time = '----'
  }
  return time
})